package com.example.homeworkrabbitmq.service;

import com.example.homeworkrabbitmq.entity.Order;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface OrderService {

    @Transactional
    Order createOrder(String username, Integer courseId);


    @Transactional
    int payOrder(String orderNo);

    @Transactional
    int timeoutOrder(String orderNo);

    Order findOne(Order order);

    int updateOrderStatus(Order order);

    List<Order> failOrderList(String username);
}
